import store from '@/store'

export const imgerror = {
  inserted: function(el, options) {
    el.onerror = () => {
      el.src = options.value
    }
  }
}

export const allow = {
  inserted: function(el, options) {
    console.log(el, 'el')
    console.log(options.value, 'options.value')
    const points = store.state.user.userInfo.roles.points
    console.log(points, 'points')
    if (!points.includes(options.value)) {
      el.style.dispiay = 'none'
    }
  }
}
